3.300 \(\int \frac {\tan (c+d x) (a B+b B \tan (c+d x))}{a+b \tan (c+d x)} \, dx\)

Optimal. Leaf size=13 \[ -\frac {B \log (\cos (c+d x))}{d} \]

[Out]

-B*ln(cos(d*x+c))/d

________________________________________________________________________________________

Rubi [A]  time = 0.01, antiderivative size = 13, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, integrand size = 32, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.062, Rules used = {21, 3475} \[ -\frac {B \log (\cos (c+d x))}{d} \]

Antiderivative was successfully verified.

[In]

Int[(Tan[c + d*x]*(a*B + b*B*Tan[c + d*x]))/(a + b*Tan[c + d*x]),x]

[Out]

-((B*Log[Cos[c + d*x]])/d)

Rule 21

Int[(u_.)*((a_) + (b_.)*(v_))^(m_.)*((c_) + (d_.)*(v_))^(n_.), x_Symbol] :> Dist[(b/d)^m, Int[u*(c + d*v)^(m +
 n), x], x] /; FreeQ[{a, b, c, d, n}, x] && EqQ[b*c - a*d, 0] && IntegerQ[m] && ( !IntegerQ[n] || SimplerQ[c +
 d*x, a + b*x])

Rule 3475

Int[tan[(c_.) + (d_.)*(x_)], x_Symbol] :> -Simp[Log[RemoveContent[Cos[c + d*x], x]]/d, x] /; FreeQ[{c, d}, x]

Rubi steps

\begin {align*} \int \frac {\tan (c+d x) (a B+b B \tan (c+d x))}{a+b \tan (c+d x)} \, dx &=B \int \tan (c+d x) \, dx\\ &=-\frac {B \log (\cos (c+d x))}{d}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.01, size = 13, normalized size = 1.00 \[ -\frac {B \log (\cos (c+d x))}{d} \]

Antiderivative was successfully verified.

[In]

Integrate[(Tan[c + d*x]*(a*B + b*B*Tan[c + d*x]))/(a + b*Tan[c + d*x]),x]

[Out]

-((B*Log[Cos[c + d*x]])/d)

________________________________________________________________________________________

fricas [A]  time = 0.54, size = 19, normalized size = 1.46 \[ -\frac {B \log \left (\frac {1}{\tan \left (d x + c\right )^{2} + 1}\right )}{2 \, d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tan(d*x+c)*(a*B+b*B*tan(d*x+c))/(a+b*tan(d*x+c)),x, algorithm="fricas")

[Out]

-1/2*B*log(1/(tan(d*x + c)^2 + 1))/d

________________________________________________________________________________________

giac [B]  time = 0.22, size = 99, normalized size = 7.62 \[ \frac {B \log \left ({\left | -\frac {\cos \left (d x + c\right ) + 1}{\cos \left (d x + c\right ) - 1} - \frac {\cos \left (d x + c\right ) - 1}{\cos \left (d x + c\right ) + 1} + 2 \right |}\right ) - B \log \left ({\left | -\frac {\cos \left (d x + c\right ) + 1}{\cos \left (d x + c\right ) - 1} - \frac {\cos \left (d x + c\right ) - 1}{\cos \left (d x + c\right ) + 1} - 2 \right |}\right )}{2 \, d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tan(d*x+c)*(a*B+b*B*tan(d*x+c))/(a+b*tan(d*x+c)),x, algorithm="giac")

[Out]

1/2*(B*log(abs(-(cos(d*x + c) + 1)/(cos(d*x + c) - 1) - (cos(d*x + c) - 1)/(cos(d*x + c) + 1) + 2)) - B*log(ab
s(-(cos(d*x + c) + 1)/(cos(d*x + c) - 1) - (cos(d*x + c) - 1)/(cos(d*x + c) + 1) - 2)))/d

________________________________________________________________________________________

maple [A]  time = 0.15, size = 18, normalized size = 1.38 \[ \frac {B \ln \left (1+\tan ^{2}\left (d x +c \right )\right )}{2 d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(tan(d*x+c)*(a*B+b*B*tan(d*x+c))/(a+b*tan(d*x+c)),x)

[Out]

1/2/d*B*ln(1+tan(d*x+c)^2)

________________________________________________________________________________________

maxima [A]  time = 1.16, size = 17, normalized size = 1.31 \[ \frac {B \log \left (\tan \left (d x + c\right )^{2} + 1\right )}{2 \, d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tan(d*x+c)*(a*B+b*B*tan(d*x+c))/(a+b*tan(d*x+c)),x, algorithm="maxima")

[Out]

1/2*B*log(tan(d*x + c)^2 + 1)/d

________________________________________________________________________________________

mupad [B]  time = 6.24, size = 17, normalized size = 1.31 \[ \frac {B\,\ln \left ({\mathrm {tan}\left (c+d\,x\right )}^2+1\right )}{2\,d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((tan(c + d*x)*(B*a + B*b*tan(c + d*x)))/(a + b*tan(c + d*x)),x)

[Out]

(B*log(tan(c + d*x)^2 + 1))/(2*d)

________________________________________________________________________________________

sympy [A]  time = 0.56, size = 37, normalized size = 2.85 \[ \begin {cases} \frac {B \log {\left (\tan ^{2}{\left (c + d x \right )} + 1 \right )}}{2 d} & \text {for}\: d \neq 0 \\\frac {x \left (B a + B b \tan {\relax (c )}\right ) \tan {\relax (c )}}{a + b \tan {\relax (c )}} & \text {otherwise} \end {cases} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tan(d*x+c)*(a*B+b*B*tan(d*x+c))/(a+b*tan(d*x+c)),x)

[Out]

Piecewise((B*log(tan(c + d*x)**2 + 1)/(2*d), Ne(d, 0)), (x*(B*a + B*b*tan(c))*tan(c)/(a + b*tan(c)), True))

________________________________________________________________________________________